<?php
    $xml = <<<xml
<?xml version='1.0' encoding='utf-8'?>
<xml>
 <ToUserName><![CDATA[toUser]]></ToUserName>
 <FromUserName><![CDATA[fromUser]]></FromUserName> 
 <CreateTime>1348831860</CreateTime>
 <MsgType><![CDATA[text]]></MsgType>
 <Content><![CDATA[this is a test]]></Content>
 <MsgId>1234567890123456</MsgId>
 </xml>   
xml;
$xml_str1 = '<?xml version="1.0" encoding="utf-8"?><response><code>0009</code><msg>号码:18978765456;运营商:联通;地区:北京 ;产品已停用</msg></response>';
$xml_str2 ='<?xml version="1.0" encoding="utf-8"?><response><code>0009</code><msg>号码:18978765456;运营商:联通;地区:北京 ;产品已停用</msg></response>';
$xml_str3 = 


    $obj = simplexml_load_string($xml);
    var_dump($obj);
    var_dump($obj->MsgId);

?>